<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>continue关键字</title>
    <script>
        // continue关键字  跳出本次循环  继续下次循环
        for (var i = 1; i <= 5; i++) {
            if (i == 3) {
                // i == 3 时跳过循环
                continue
            }
            console.log(i);
        }
        console.log('---------');
        // 求1-100之间 ，除被7整除之外的整数和
        var sum = 0;
        for (var i = 1; i <= 100; i++) {
            if (i % 7 ==0) {
                continue
            }
            sum += i ;
        }
        console.log(sum);
    </script>
</head>
<body>
    
</body>
</html>